package com.HZNU.spring_api.Service;


import com.HZNU.spring_api.POJO.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "HZNU-XIAODONG-SPRINGCLOUD-PROVIDER-DEPT",fallbackFactory = DeptClientFallBack.class) //可以直接调用服务
public interface DeptClientService {
    @GetMapping("dept/get/{id}")//这里可能是这里的地址对应上就可以了吧，并不要求函数名也要一致
    public Dept get(@PathVariable("id")int id);

}
